﻿using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Wpf.Ui;
using Wpf.Ui.Appearance;
using Wpf.Ui.Controls;

namespace WPF.UITest
{
  /// <summary>
  /// Interaction logic for MainWindow.xaml
  /// </summary>
  public partial class MainWindow : Window
  {
    public MainWindow()
    {
      InitializeComponent();
      Loaded += (sender, args) =>
      {
        //SystemThemeWatcher.Watch(this as System.Windows.Window);
        //SystemThemeWatcher.UnWatch(this as System.Windows.Window);

        Wpf.Ui.Appearance.SystemThemeWatcher.Watch(
            this,                                    // Window class
            Wpf.Ui.Controls.WindowBackdropType.Acrylic, // Background type
            true                                     // Whether to change accents automatically
        );
      };
    }
    private ControlAppearance _snackbarAppearance = ControlAppearance.Secondary;
    SnackbarService snackbarService = new SnackbarService();
    private void Button_Click(object sender, RoutedEventArgs e)
    {
      snackbarService.SetSnackbarPresenter(sbp);
      snackbarService.Show(
        "Don't Blame Yourself.",
        "No Witcher's Ever Died In His Bed.",
        _snackbarAppearance,
        new SymbolIcon(SymbolRegular.Fluent24),
        TimeSpan.FromSeconds(6)
    );
    }
    }
}